﻿using System.Text.Json.Serialization;

namespace Digitalmes.ControlEx;

public sealed class RectPoint
{
    /// <summary>
    /// 矩形宽度
    /// </summary>
    public double Width { get; set; }

    /// <summary>
    /// 矩形高度
    /// </summary>
    public double Height { get; set; }

    /// <summary>
    /// 显示文本
    /// </summary>
    public string? Text { get; set; }

    /// <summary>
    /// 编号
    /// </summary>
    public int No { get; set; }

    /// <summary>
    /// 编号分组，默认为空。
    /// </summary>
    [NotNull]
    public string? Group { get; set; } = string.Empty;

    /// <summary>
    /// 状态
    /// </summary>
    [JsonConverter(typeof(JsonStringEnumConverter))]
    public RectState State { get; set; } = RectState.None;

    /// <summary>
    /// 画布 X 轴（左上顶点）
    /// </summary>
    public double X { get; set; }

    /// <summary>
    /// 画布 Y 轴（左上顶点）
    /// </summary>
    public double Y { get; set; }
}
